package com.lp.biz.operations.model.vo;

import com.lp.biz.content.model.entity.BizCoreContent;
import lombok.Data;

import static com.lp.common.constant.CommonConstant.NEGATE;

/**
 * @program: backend
 * @description:
 * @author: Ke.Song
 * @since: 2024-07-14 20:41:37
 */
@Data
public class RecommendContent {

    private Integer id;

    private String imageUrl;

    private String title;

    private Integer isAdd;

    private String content;

    private String bizCategoryCode;

    private String source;

    private Integer isRecommend;

    public static RecommendContent builder(BizCoreContent content) {
        RecommendContent recommendContent = new RecommendContent();
        recommendContent.setId(content.getId());
        recommendContent.setImageUrl(content.getImageV());
        recommendContent.setTitle(content.getTitle());
        recommendContent.setBizCategoryCode(content.getBizCategoryCode());
        recommendContent.setIsAdd(NEGATE);
        return recommendContent;
    }
}
